package bigdata

// GetCustomerMonitorRequest 客户监控
type GetCustomerMonitorRequest struct {
	TenantCode   string `json:"tenant_code"`
	TenantUserId string `json:"tenant_user_id"`
	Page         int32  `json:"page"`
	PageSize     int32  `json:"page_size"`
	//客户名称
	CustomerName string `json:"customer_name"`
	//动态类型（招标1、中标2、土地3、在建4、开盘5、合作案例6）
	FeedTypeCode []string `json:"feed_type_code"`
	//地区code
	AreaCode []string `json:"area_code"`
	//动态开始时间
	StartDate string `json:"start_date"`
	//动态结束时间
	EndDate string `json:"end_date"`
}

// GetCustomerMonitorResponse 客户监控
type GetCustomerMonitorResponse struct {
	Success   bool             `json:"success"`
	ErrorCode int32            `json:"error_code"`
	Message   string           `json:"message"`
	Data      *CustomerMonitor `json:"data"`
}

type CustomerMonitor struct {
	List []*CustomerMonitorItem `json:"list"`
	//Sql   string                 `json:"sql"`
	Total int32 `json:"total"`
}

type CustomerMonitorItem struct {
	City          string `json:"city"`
	CityCode      string `json:"city_code"`
	CreditCode    string `json:"credit_code"`
	CustomerName  string `json:"customer_name"`
	FeedDate      string `json:"feed_date"`
	FeedType      string `json:"feed_type"`
	FeedTypeCode  string `json:"feed_type_code"`
	ID            string `json:"id"`
	JumpID        string `json:"jump_id"`
	Province      string `json:"province"`
	ProvinceCode  string `json:"province_code"`
	Title         string `json:"title"`
	TenantCode    string `json:"tenant_code"`
	TenantUserUID string `json:"tenant_user_uid"`
}

type MarketInsightCommonRequest struct {
	TimeBegin    string `json:"time_begin"`
	TimeEnd      string `json:"time_end"`
	ProvinceCode string `json:"province_code"`
	CityCode     string `json:"city_code"`
}

type BuildHistogramItem struct {
	AllArea   float64 `json:"all_area"`
	AllInvest float64 `json:"all_invest"`
	Number    int32   `json:"number"`
	PrjType   string  `json:"prj_type"`
}

type BuildHistogramData struct {
	List []*BuildHistogramItem `json:"list"`
}

type ProjectBuildHistogramResponse struct {
	Data      *BuildHistogramData `json:"data"`
	ErrorCode int                 `json:"error_code"`
	Message   string              `json:"message"`
	Success   bool                `json:"success"`
}

type ProjectSaleHistogramResponse struct {
	Data      *SaleHistogramData `json:"data"`
	ErrorCode int                `json:"error_code"`
	Message   string             `json:"message"`
	Success   bool               `json:"success"`
}

type SaleHistogramData struct {
	List []*SaleHistogramItem `json:"list"`
}

type SaleHistogramItem struct {
	FitmentFee string `json:"fitment_fee"`
	BuildArea  string `json:"build_area"`
	Number     int32  `json:"number"`
}

type ProjectLandHistogramResponse struct {
	Data      *LandHistogramData `json:"data"`
	ErrorCode int                `json:"error_code"`
	Message   string             `json:"message"`
	Success   bool               `json:"success"`
}

type LandHistogramData struct {
	List []*LandHistogramItem `json:"list"`
}

type LandHistogramItem struct {
	LandUsage string `json:"land_usage"`
	AllArea   string `json:"all_area"`
	Number    int32  `json:"number"`
}

type MarketInsightTopListRequest struct {
	TimeBegin    string `json:"time_begin"`
	TimeEnd      string `json:"time_end"`
	ProvinceCode string `json:"province_code"`
	CityCode     string `json:"city_code"`
	Page         int32  `json:"page"`
	PageSize     int32  `json:"page_size"`
}

type GetProjectTopListResponse struct {
	Data      *ProjectTopListData `json:"data"`
	ErrorCode int                 `json:"error_code"`
	Message   string              `json:"message"`
	Success   bool                `json:"success"`
}

type ProjectTopListData struct {
	List []*ProjectTopItem `json:"list"`
}

type ProjectTopItem struct {
	AllArea        interface{} `json:"all_area"`
	DeveloperName  string      `json:"developer_name"`
	Number         int32       `json:"number"`
	OrganizingCode string      `json:"organizing_code"`
}

type GetCompanyTargetRequest struct {
	CompanyName []string `json:"company_name"`
}
type GetCompanyTargetResponse struct {
	Success bool                  `json:"success"`
	Message string                `json:"message"`
	Data    *GetCompanyTargetData `json:"Data"`
}
type GetCompanyTargetData struct {
	List []*GetCompanyTargetItem `json:"list"`
	Sql  string                  `json:"sql"`
}
type GetCompanyTargetItem struct {
	CommencePermitCnt             int32   `json:"commence_permit_cnt"`
	CommencePermitCnt1Year        int32   `json:"commence_permit_cnt_1year"`
	CommencePermitCnt2Year        int32   `json:"commence_permit_cnt_2year"`
	ContactCnt                    int32   `json:"contact_cnt"`
	CoopSupplierContactCnt        int32   `json:"coop_supplier_contact_cnt"`
	CooperationCaseCnt            int32   `json:"cooperation_case_cnt"`
	CooperationCaseCnt1Year       int32   `json:"cooperation_case_cnt_1year"`
	CooperationCaseCnt2Year       int32   `json:"cooperation_case_cnt_2year"`
	CooperationEnterpriseCnt      int32   `json:"cooperation_enterprise_cnt"`
	CooperationEnterpriseCnt1Year int32   `json:"cooperation_enterprise_cnt_1year"`
	CooperationEnterpriseCnt2Year int32   `json:"cooperation_enterprise_cnt_2year"`
	DeveloperName                 string  `json:"developer_name"`
	NewHouseSale2Year             float32 `json:"new_house_sale_2year"`
	OrganizingCode                string  `json:"organizing_code"`
	PurchaseContactCnt            int32   `json:"purchase_contact_cnt"`
	PurchaseContactCnt1Year       int32   `json:"purchase_contact_cnt_1year"`
	PurchaseContactCnt2Year       int32   `json:"purchase_contact_cnt_2year"`
	PurchaseDemandCnt             int32   `json:"purchase_demand_cnt"`
	PurchaseDemandCnt1Year        int32   `json:"purchase_demand_cnt_1year"`
	PurchaseDemandCnt2Year        int32   `json:"purchase_demand_cnt_2year"`
	SellProjectCnt                int32   `json:"sell_project_cnt"`
	SellProjectCnt1Year           int32   `json:"sell_project_cnt_1year"`
	SellProjectCnt2Year           int32   `json:"sell_project_cnt_2year"`
	SellProjectSetsCnt            int32   `json:"sell_project_sets_cnt"`
	SellProjectSetsCnt1Year       int32   `json:"sell_project_sets_cnt_1year"`
	SellProjectSetsCnt2Year       int32   `json:"sell_project_sets_cnt_2year"`
	SupplierContactCnt            int32   `json:"supplier_contact_cnt"`
	TakeLandCnt                   int32   `json:"take_land_cnt"`
	TakeLandCnt1Year              int32   `json:"take_land_cnt_1year"`
	TakeLandCnt2Year              int32   `json:"take_land_cnt_2year"`
}

type GetCustomerPieChartResponse struct {
	Data      *CustomerPieChartData `json:"data"`
	ErrorCode int32                 `json:"error_code"`
	Message   string                `json:"message"`
	Success   bool                  `json:"success"`
}
type CustomerPieChartData struct {
	List []*CustomerPieChartItem `json:"list"`
}
type CustomerPieChartItem struct {
	CompanyTypeLabel string `json:"company_type_label"`
	Number           int32  `json:"number"`
}
type GetCustomerTopListResponse struct {
	Data      *CustomerTopListData `json:"data"`
	ErrorCode int32                `json:"error_code"`
	Message   string               `json:"message"`
	Success   bool                 `json:"success"`
}

type CustomerTopListData struct {
	List  []*CustomerTopItem `json:"list"`
	Total int32              `json:"total"`
}

type CustomerTopItem struct {
	CompanyName      string `json:"company_name"`
	CompanyTypeLabel string `json:"company_type_label"`
	OrganizingCode   string `json:"organizing_code"`
	//TotalCnt         string `json:"total_cnt"`
}

type GetLineChartResponse struct {
	Data      *LineChartData `json:"data"`
	ErrorCode int32          `json:"error_code"`
	Message   string         `json:"message"`
	Success   bool           `json:"success"`
}

type LineChartData struct {
	List []*LineChartItem `json:"list"`
	Sql  string           `json:"sql"`
}

type LineChartItem struct {
	BidCnt          int32   `json:"bid_cnt"`
	BuildAreaCnt    float64 `json:"build_area_cnt"`
	Month           string  `json:"month"`
	OpeningCnt      int32   `json:"opening_cnt"`
	ProjectAreaCnt  float64 `json:"project_area_cnt"`
	ProjectCnt      int32   `json:"project_cnt"`
	TakeLandAreaCnt float64 `json:"take_land_area_cnt"`
	TakeLandCnt     int32   `json:"take_land_cnt"`
	WinbidCnt       int32   `json:"winbid_cnt"`
}

type GetBidHistogramResponse struct {
	Data      *GetBidHistogramData `json:"data"`
	ErrorCode int                  `json:"error_code"`
	Message   string               `json:"message"`
	Success   bool                 `json:"success"`
}

type GetBidHistogramData struct {
	List []*GetBidHistogramItem `json:"list"`
}

type GetBidHistogramItem struct {
	BidCnt    int32 `json:"bid_cnt"`
	WinbidCnt int32 `json:"winbid_cnt"`
}

type GetBidTop20CompanyResponse struct {
	Data      *GetBidTop20CompanyData `json:"data"`
	ErrorCode int32                   `json:"error_code"`
	Message   string                  `json:"message"`
	Success   bool                    `json:"success"`
}

type GetBidTop20CompanyData struct {
	List  []*BidTop20Company `json:"list"`
	Total int32              `json:"total"`
}

type BidTop20Company struct {
	BidCnt         int32  `json:"bid_cnt"`
	CompanyName    string `json:"company_name"`
	OrganizingCode string `json:"organizing_code"`
	Total          int32  `json:"total"`
	WinbidCnt      int32  `json:"winbid_cnt"`
}
